<template>
    <div class="children_content">
        <div class="dynamicform_top">
            <div class="left">
                <div class="input_box">
                    <div class="label">模块:</div>
                    <div class="input">
                        <Input v-model="dynamicForm.module" placeholder="输入模块代码" clearable />
                    </div>
                </div>
            </div>
            <div class="right">
                <Button icon="md-eye" style="margin-right: 15px;">预览</Button>
                <Button type="primary" icon="ios-paper-plane">发布</Button>
            </div>
        </div>
        <div class="dynamicform_content">
            <div class="left">
                <itemIcon />
            </div>
            <div class="right">
                <dynamicFormView />
            </div>
            <div class="config_box">
                <settingConfig />
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { dynamicFormStore } from '@/store/dynamicForm';
import itemIcon from './itemIcon.vue';
import dynamicFormView from './form.vue';
import settingConfig from './settingView/index.vue'

const dynamicForm = dynamicFormStore();

</script>

<style lang="scss" scoped>
.children_content {
    .dynamicform_top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px;
        background-color: #fff;
        border-radius: 3px;
        .left {
            display: flex;
            align-items: center;
            .input_box {
                display: flex;
                align-items: center;
                .label {
                    margin-right: 10px;
                }
            }
        }
    }
    .dynamicform_content {
        height: calc(100vh - 162px);
        max-height: calc(100vh - 162px);
        margin-top: 10px;
        display: flex;
        justify-content: space-between;
        .left {
            width: 320px;
            padding: 10px;
            flex-shrink: 0;
            height: 100%;
            max-height: calc(100vh - 162px);
            overflow-y: auto;
            background-color: #fff;
            border-radius: 3px;
        }
        .right {
            flex: 1;
            background-color: #fff;
            margin: 0 10px;
            padding: 10px;
            padding-top: 20px;
            height: 100%;
            max-height: calc(100vh - 167px);
            border-radius: 3px;
            overflow: auto;
        }
        .config_box {
            width: 320px;
            padding: 10px;
            flex-shrink: 0;
            height: 100%;
            max-height: calc(100vh - 167px);
            overflow-y: auto;
            background-color: #fff;
            border-radius: 3px;
        }
    }
}
</style>